package com.beyond.market.evaluate.service.impl;

import com.beyond.market.evaluate.dao.EvaluateMapper;
import com.beyond.market.evaluate.domain.Evaluate;
import com.beyond.market.evaluate.service.EvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;

@Service
public class EvaluateServiceImpl implements EvaluateService {
    @Autowired
    private EvaluateMapper evaluateMapper;

    @Override
    public int save(Evaluate evaluate) throws SQLException {
        return evaluateMapper.save(evaluate);
    }

    @Override
    public int remove(Integer evaluateId) throws SQLException {
        return evaluateMapper.remove(evaluateId);
    }

    @Override
    public int update(Evaluate evaluate) throws SQLException {
        return evaluateMapper.update(evaluate);
    }

    @Override
    public Evaluate getByPrimaryKey(Integer evaluateId) throws SQLException {
        return evaluateMapper.getByPrimaryKey(evaluateId);
    }

    @Override
    public List<Evaluate> listAll() throws SQLException {
        return evaluateMapper.listAll();
    }

    @Override
    public List<Evaluate> getByUser(Integer user_id) throws SQLException {
        return evaluateMapper.getByUser(user_id);
    }
}
